import {HOT_API} from '../../api/url'
import http from '../../api/http'
export default {
  namespaced: true,
  state: {
    hot:[]
  },
  mutations: {
    setState(state,payload){
      state.hot=payload;
    }
  },
  actions: {
    async requestHotList(context){
      const {data:{movieList}} = await http.get(HOT_API);
      // console.log(movieList);
      context.commit('setState',movieList)
    },
    // async requestRecommendList(){
    //   const result = await http.get(RECOMMEND_LIST_API);
    //   console.log(result);
    // }
  }
}